<div style="height: 100%;" [busyIf]="primengTableHelper.isLoading">
    <div class="form-group form-md-line-input form-md-floating-label no-hint">
        <label>需要定制数量: </label>
        {{ pipe.amountPlanned }}
    </div>

    <div
        *ngIf="batch?.sideTasks?.length"
        class="form-group form-md-line-input form-md-floating-label no-hint"
    >
        <label>定制信息: </label>
        <span *ngFor="let item of batch?.sideTasks">
            <h6 style="height: 40px;">
                {{ item.producerId }} 车间， 定制数量：{{ item.totalQuantity }}
            </h6>
            <h6 style="height: 40px;">
                <label style="float:left;line-height: 30px;margin-right: 5px">送回时间: </label>
                <p-calendar [(ngModel)]="receptionTime" name="receptionTime" dateFormat="yy-mm-dd" [ngStyle]="{ 'margin-right': '10px' }">
                </p-calendar>
                <p-dropdown
                    *ngIf="batch?.sideTasks?.length"
                    [options]="teamGroups"
                    name="teamGroups"
                    [(ngModel)]="teamGroupName"
                    placeholder="选择打印机"
                    optionLabel="displayText"
                    [style]="{ 'width': '190px' }"
                ></p-dropdown>

            </h6>
                <label>定制性质: </label>
                <input style="width:98%;height:40px;" class="form-control"
                name="sideProperty"
                type="text"
                [(ngModel)]="item.sideProperty"
            />
                <label style="margin: 10px 0">备注: </label>
                <input style="width:98%;height:40px;"
                class="form-control"
                name="remark"
                type="text"
                [(ngModel)]="item.remark"
                />
            <h6 style="height: 40px;margin-top: 10px">
                <button
                    *ngIf="batch?.sideTasks?.length"
                    type="button"
                    class="btn btn-sm btn-success float-right"
                    (click)="print(item)"
                >
                    <span>打印定制单</span>
                </button>
            </h6>
            <hr style="color:#ebedf2">
        </span>
    </div>

    <div class="form-group">
        <label>选择定制车间: </label>
        <select
            name="departments"
            class="form-control"
            [(ngModel)]="departmentValue"
            title="选择定制车间"
        >
            <option *ngFor="let department of departments" [value]="department.value">{{
                department.name
            }}</option>
        </select>

    </div>

    <div class="row">
        <div class="col-lg-12">
            <button
                type="button"
                class="btn btn-sm btn-success float-right"
                (click)="save()"
                [buttonBusy]="saving"
                [busyText]="'生成定制单中...'"
            >
                <i class="fa fa-check-circle"></i> <span>生成定制单</span>
            </button>
        </div>
    </div>
</div>
